package com.zhongwang.mms.module.buy.service;
import com.zhongwang.mms.module.buy.dao.PurchaseDao;
import com.zhongwang.mms.module.buy.model.PurchaseModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
/**
 * @Description: 项目 服务层
 * @Author: China.kxx
 * @Date: 2020/03/30 16:19
 */
@Service
public class PurchaseService {
    @Autowired
    private PurchaseDao purchaseDao;

    /**
     * @Author: China.kxx
     * @Date: 2020/05/16 10:49
     */
    public List<PurchaseModel> listDivision() {
        return purchaseDao.purchaseDivision();
    }
    /**
     * 根据条件查询项目
     * @return 项目列表数据
     */
    public List<PurchaseModel> findProject(PurchaseModel purchaseModel) {
        return purchaseDao.purchaseAll(purchaseModel);
    }
    /**
     * 根据条件查询项目数量
     * @return 数据数量
     */
    public Integer findProjectCount(PurchaseModel purchaseModel) {
        return purchaseDao.findProjectCount(purchaseModel);
    }

    //public Long findProjectCount(PurchaseModel purchaseModel) {
    //    return purchaseDao.purchaseAll_COUNT(purchaseModel);
    //}
}

